/**
 * 
 *//*
package com.cipe.cmrs.service;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import com.cipe.cmrs.model.Impact;
import com.cipe.cmrs.model.User;
import com.cipe.cmrs.util.DateUtil;

*//**
 * @author Incepio
 *//*
@Service
@Transactional
public class ImpactService extends BaseService<Impact> {

	@Autowired
	private UserService	userService;

	public Impact saveImpact(Impact impact, Integer userId) {
		if (impact != null) {
			User user = userService.findById(userId);
			Impact dbImpact = findById(impact.getId());
			if (dbImpact == null) {
				dbImpact = new Impact();
				dbImpact.setCreatedBy(user);
				dbImpact.setCreationDate(DateUtil.getCurrentDate());
			}
			dbImpact.setDisplayName(impact.getDisplayName());
			dbImpact.setDescription(impact.getDescription());
			dbImpact.setUpdatedBy(user);
			dbImpact.setUpdationDate(DateUtil.getCurrentDate());
			return merge(dbImpact);
		}
		return null;
	}
}
*/